<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>
        <span class="front ele">前</span>

    
        <img class="float" src="./star.png">
    
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>
        <span class="back ele">后</span>

    </div>
    <style>
        .ele{/*把前后内联元素的共性设在这里*/ 
            display: inline-block;
            width: 30px;
            height: 30px;
            color: aliceblue;
            text-align: center;
            line-height: 30px;
            border-radius: 50%;
        }
        .float{
            float: left;
        }
        .front{
            background-color: black;
        }
        .back{
            background-color: blue;
        }
    
        </style>
    
    
</body>
</html>